Skip to content

Send Java SDK identity with Feature Flagging EVP events - #12575

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 17 commits into
masterfrom
leoromanovsky/fflsdk-187-java-evp-identity
Oct 21, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 17 commits into
masterfrom
leoromanovsky/fflsdk-187-java-evp-identity

Conversation

@leoromanovsky

Copy link
Copy Markdown
Contributor

Motivation

Attribute Feature Flagging exposures and flag evaluations to the Java SDK on both local EVP proxy and direct-intake routes. Initial direct delivery already shipped; this PR isolates producer identity from the transport hardening in #12477. Tracks FFL-3016 within the FFLSDK-187 rollout.

Changes

  • Send DD-EVP-ORIGIN: dd-trace-java and DD-EVP-ORIGIN-VERSION using the tracer version.
  • Add immutable per-request header configuration to the shared backend factory.
  • Verify local/direct identity headers while retaining credential-isolation and one-send assertions.

Decisions

  • Stack on leoromanovsky/fflsdk-187-java-evp-fallback, not another language or unrelated SDK branch.
  • Forwarding-capability requirements, routing, retries, credentials and lifecycle remain in Harden Agentless Feature Flags EVP delivery #12477. Required header names are independent of the identity values emitted here.
  • No new configuration or system-test changes.

Validation

  • Exact base: 1b5766b56c67bb7151a084abb752e62e5bb4b332.
  • Exact candidate: 96a3427bb9bcb640165306d16af141e9455e2cc4.
  • ./gradlew :communication:spotlessApply :products:feature-flagging:feature-flagging-lib:spotlessApply :communication:test :products:feature-flagging:feature-flagging-lib:test --console=plain --max-workers=4: PASS; communication 235/235, feature-flagging-lib 279/279.
  • git diff --check: PASS. New commit is GitHub verified: verified=true, reason=valid.
  • No current-candidate system-tests, dogfooding or backend-intake run. Older artifact results are not claimed for this split.
  • Fresh CI remains separate from local validation. This PR remains a draft.

Add capability-gated local discovery, safe sticky direct fallback, shared route state, send-once semantics, and bounded lifecycle handling for Java Feature Flags telemetry.

Environment: Datadog workspace
Move identity attribution to a follow-up branch while keeping forwarding-capability requirements explicit and independent of emitted headers. Preserve credential isolation, no-replay coverage, and existing lifecycle hardening.

Validation: communication tests 234/234 and feature-flagging-lib tests 279/279 pass; scoped Spotless formatting passes.

Environment: Datadog workspace
Add immutable per-request identity headers independently of forwarding capability checks and send-once policy. Emit dd-trace-java and the tracer version for both exposure and flag-evaluation requests.

Validation: communication tests 235/235 and feature-flagging-lib tests 279/279 pass; scoped Spotless formatting passes. Local/direct wire assertions preserve credential isolation and one-send behavior.

Environment: Datadog workspace
@leoromanovsky leoromanovsky added type: feature Enhancements and improvements tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature labels Sep 19, 2026
@linear-code

linear-code Bot commented Sep 19, 2026

Copy link
Copy Markdown

FFLSDK-187

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 30.77%
• Overall Coverage: 61.51% (+1.65%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ea60b85 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.69 s 14.61 s [-0.2%; +1.3%] (no difference)
startup:insecure-bank:tracing:Agent 13.50 s 13.64 s [-1.7%; -0.3%] (maybe better)
startup:petclinic:appsec:Agent 17.13 s 16.87 s [+0.6%; +2.4%] (maybe worse)
startup:petclinic:iast:Agent 16.98 s 17.01 s [-1.0%; +0.6%] (no difference)
startup:petclinic:profiling:Agent 16.74 s 16.60 s [-0.4%; +2.0%] (no difference)
startup:petclinic:sca:Agent 17.02 s 16.94 s [-0.3%; +1.3%] (no difference)
startup:petclinic:tracing:Agent 16.02 s 16.05 s [-1.2%; +0.8%] (no difference)

Commit: ea60b85f · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

Environment: Datadog workspace
Gate shutdown instrumentation on tracing or resolved feature flag enablement, and share Agent path joining. Pin recovery generations, discovery concurrency, replay, idle recovery, and disabled-product behavior with regression tests.

Environment: Datadog workspace
@leoromanovsky
leoromanovsky added this pull request to stack #12771 October 7, 2026 15:24
@leoromanovsky
leoromanovsky marked this pull request as ready for review October 7, 2026 15:25
@leoromanovsky
leoromanovsky requested review from a team as code owners October 7, 2026 15:25
@leoromanovsky
leoromanovsky requested review from greghuels, mcculls and vjfridge and removed request for a team October 7, 2026 15:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T15:29:22.276016Z 96a3427 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-07T15:29:50.948765Z 96a3427 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Java SDK identity headers reach both local EVP and direct-intake requests while preserving credential isolation, send-once settings, and redirect behavior. The completed static review identified no actionable regression.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 96a3427 · @DataDog review to ask questions

Comment thread communication/src/main/java/datadog/communication/BackendApiFactory.java Outdated
Comment thread communication/src/main/java/datadog/communication/BackendApiFactory.java Outdated
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot requested review from ValentinZakharov and sarahchen6 and removed request for a team October 16, 2026 19:24

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The direct client in FeatureFlagBackendApiFactory.java is constructed before SharedCommunicationObjects (and its HTTP timeout settings) are initialized, causing getIntakeHttpClient() to cache zero connect/read/write timeouts; since the client is not rebuilt on later initialization, stalled intake requests can block the writer indefinitely and drop queued events.

Open Bits AI session

🤖 Bits Code Review · Commit 8ad35c4

Preserve shared timeout initialization while merging SDK identity headers. Add real-writer identity coverage with a non-fallback version fixture, remove the new map-only constructor, and address test cleanup and capability documentation.

Environment: Datadog workspace
Carry the reviewed identity wiring, real-writer version coverage, and timeout initialization onto master d87fe11 without broadening the identity change.

Environment: Datadog workspace
@leoromanovsky
leoromanovsky removed this pull request from stack #12771 October 21, 2026 00:52
@leoromanovsky
leoromanovsky added this pull request to the merge queue Oct 21, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-21 01:57:06 UTC ℹ️ Start processing command /merge


2026-10-21 01:57:10 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-10-21 02:55:44 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit e8ea184 into master Oct 21, 2026
609 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the leoromanovsky/fflsdk-187-java-evp-identity branch October 21, 2026 02:55
@github-actions github-actions Bot added this to the 1.68.0 milestone Oct 21, 2026
PerfectSlayer added a commit that referenced this pull request Oct 21, 2026
Keep the deletion of the agent-coupled Feature Flags writers modified by
#12575, whose SDK identity headers are ported next, and of the
feature-flagging-api module cleaned up by #12706. Restore the CODEOWNERS
rules of other teams lost in an earlier merge.
PerfectSlayer added a commit that referenced this pull request Oct 21, 2026
Port #12575 to the SDK and the agent bridge: exposures and flag
evaluations carry the DD-EVP-ORIGIN and DD-EVP-ORIGIN-VERSION headers,
dd-trace-java and the library version, through the agent event proxy and
direct intake alike. An agentless proxy endpoint is used only when the
Agent forwards both headers. The smoke tests mock Agent advertises them
like the Agent does.
PerfectSlayer added a commit that referenced this pull request Oct 21, 2026
Port #12575 to the SDK and the agent bridge: exposures and flag
evaluations carry the DD-EVP-ORIGIN and DD-EVP-ORIGIN-VERSION headers,
dd-trace-java and the library version, through the agent event proxy and
direct intake alike. An agentless proxy endpoint is used only when the
Agent forwards both headers. The smoke tests mock Agent advertises them
like the Agent does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 21, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 21, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 21, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 22, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 22, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 22, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 22, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 22, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 22, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sarahchen6 pushed a commit that referenced this pull request Oct 22, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer added a commit that referenced this pull request Oct 23, 2026
Port the agent-side behaviors of the removed writers: send each event
batch once with proxy discovery and recovery, and the Java SDK identity
headers (#12477, #12575); flush the SDK pending events at agent
shutdown, with or without tracing; declare the SDK settings the agent
exposes (#12884, #12774). Move the Feature Flags shutdown tests from the
agent tests to the OpenFeature smoke tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: openfeature OpenFeature tag: ai generated Largely based on code generated by an AI or LLM type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants